package me.zhengjie.modules.finace_taxation.service;

import me.zhengjie.base.PageInfo;
import me.zhengjie.modules.finace_taxation.domain.FtIndustryDetails;
import me.zhengjie.modules.finace_taxation.service.dto.FtIndustryDetailsDto;
import me.zhengjie.modules.finace_taxation.service.dto.FtIndustryDetailsQueryParam;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* @author 杨荣森
* @date 2021-06-23
*/
public interface FtIndustryDetailsService {

    static final String CACHE_KEY = "ftIndustryDetails";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<FtIndustryDetailsDto>
    */
    PageInfo<FtIndustryDetailsDto> queryAll(FtIndustryDetailsQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<FtIndustryDetailsDto>
    */
    List<FtIndustryDetailsDto> queryAll(FtIndustryDetailsQueryParam query);

    FtIndustryDetails getById(String id);
    FtIndustryDetailsDto findById(String id);

    /**
     * 插入一条新数据。
     */
    int insert(FtIndustryDetailsDto resources);
    int updateById(FtIndustryDetailsDto resources);
    int removeById(String id);
    int removeByIds(Set<String> ids);

    List<FtIndustryDetails> queryIndustryList();

    // 分页查询行业动态
    PageInfo<FtIndustryDetails> getIndustryByPage(Map<String, Object> map);

    // 点击增加浏览量
    int addBrowseNumber(String id);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
     void download(List<FtIndustryDetailsDto> all, HttpServletResponse response) throws IOException;
}
